/**
 * Generate time : 2012-01-09 14:16:16
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEEquipmentInformation table comment : 设备资料
 */
public class ZMCEEquipmentInformation extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEquipmentinId = " "; /* 对应设备ID */
	private String fdCode = " "; /* 编号 */
	private String fdName = " "; /* 资料名称 */
	private Long fdParts = new Long(0); /* 份数 */
	private String fdAddress = " "; /* 存放地点 */
	private String fdCustodian = " "; /* 保管人 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentinId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应设备ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdName");
		eiColumn.setFieldLength(40);
		eiColumn.setDescName("资料名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParts");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("份数");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAddress");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("存放地点");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCustodian");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("保管人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEEquipmentInformation() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEquipmentinId - 对应设备ID
	 * 
	 * @return the fdEquipmentinId
	 */
	public String getFdEquipmentinId() {
		return this.fdEquipmentinId;
	}

	/**
	 * set the fdEquipmentinId - 对应设备ID
	 */
	public void setFdEquipmentinId(String fdEquipmentinId) {
		this.fdEquipmentinId = fdEquipmentinId;
	}

	/**
	 * get the fdCode - 编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdName - 资料名称
	 * 
	 * @return the fdName
	 */
	public String getFdName() {
		return this.fdName;
	}

	/**
	 * set the fdName - 资料名称
	 */
	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/**
	 * get the fdParts - 份数
	 * 
	 * @return the fdParts
	 */
	public Long getFdParts() {
		return this.fdParts;
	}

	/**
	 * set the fdParts - 份数
	 */
	public void setFdParts(Long fdParts) {
		this.fdParts = fdParts;
	}

	/**
	 * get the fdAddress - 存放地点
	 * 
	 * @return the fdAddress
	 */
	public String getFdAddress() {
		return this.fdAddress;
	}

	/**
	 * set the fdAddress - 存放地点
	 */
	public void setFdAddress(String fdAddress) {
		this.fdAddress = fdAddress;
	}

	/**
	 * get the fdCustodian - 保管人
	 * 
	 * @return the fdCustodian
	 */
	public String getFdCustodian() {
		return this.fdCustodian;
	}

	/**
	 * set the fdCustodian - 保管人
	 */
	public void setFdCustodian(String fdCustodian) {
		this.fdCustodian = fdCustodian;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEquipmentinId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentinId")), fdEquipmentinId));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdName")), fdName));
		setFdParts(NumberUtils.toLong(StringUtils.toString(map.get("fdParts")), fdParts));
		setFdAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAddress")), fdAddress));
		setFdCustodian(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCustodian")), fdCustodian));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEquipmentinId", StringUtils.toString(fdEquipmentinId, eiMetadata.getMeta("fdEquipmentinId")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdName", StringUtils.toString(fdName, eiMetadata.getMeta("fdName")));
		map.put("fdParts", StringUtils.toString(fdParts, eiMetadata.getMeta("fdParts")));
		map.put("fdAddress", StringUtils.toString(fdAddress, eiMetadata.getMeta("fdAddress")));
		map.put("fdCustodian", StringUtils.toString(fdCustodian, eiMetadata.getMeta("fdCustodian")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}